<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    body{
      margin: 0;
      overflow:0;
    }
  .item1, .item2{
background-color: #f00;
  }
  
  .item1{
    float:left;
    /* 定位脱标 */
    position: fixed;
    /* left:0;
    top:0; */
    background-color: #0f0;
    /* top:10px;*/
  } 
  .item2{
float:right;
  }
  .box{
    width:200px;
    height: 200px;
    margin:0 auto;
    background-color:orange;
    padding: 10px;
  }
  </style>
</head>
<body>
  <div class="box">
      <div class="item1">1</div>
      <div class="item2">2</div>
  </div>

</body>
</html>